import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
from PyQt4.QtNetwork import QNetworkAccessManager,QNetworkRequest
from ui import Ui_MainWindow
from util import do_sms
import time,threading

import sys
from PyQt4 import QtCore, QtGui, uic
 
qtCreatorFile = "01.ui" # Enter file here.
 
Ui_MainWindow, QtBaseClass = uic.loadUiType(qtCreatorFile)
 
class MyApp(QtGui.QMainWindow, Ui_MainWindow):
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        Ui_MainWindow.__init__(self)
        self.setupUi(self)
    def init(self):
        self.LineEdit.setText('10086')
       
        self.pushButton.clicked.connect(self.start)
    def start(self):
        t = threading.Thread(target=do_sms,args=(self.LineEdit.text(),))
        t.start()
#url = str(self.line_address.text())
# self.line_address.setText(url)
# self.dom=self.webView.page().mainFrame().documentElement()

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    window = MyApp()
    window.init()
    window.show()
    sys.exit(app.exec_())
